import Vue from 'vue'
import App from './App.vue'
import router from './router'
import   './assets/styles/main.less' //引入公共样式
import 'vant/lib/index.css';
import store from './store'   //引入仓库
import { Button,Icon ,Image as VanImage,NoticeBar,Tag,Rate,GoodsActionIcon,Divider,Tab, Tabs,Toast,Overlay,Popup,Stepper,Badge  } from 'vant';
Vue.use(Button);//按钮
Vue.use(Icon);  //字体
Vue.use(VanImage);  //图片
Vue.use(NoticeBar )
Vue.use(Tag ) //标签
Vue.use(Rate )  //评分
Vue.use(Divider )  //分割线
Vue.use(GoodsActionIcon )  //收藏
Vue.use(Tab);  //标签
Vue.use(Tabs);//标签
Vue.use(Toast);
Vue.use(Overlay); //遮罩
Vue.use(Popup);  //弹出层
Vue.use(Stepper);  //步进器
Vue.use(Badge)    //徽章


//重复点击同一路由报错
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
